<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"></meta>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
</link>
</head>
<body>
<div id="grandparent">
    <div id="parent1">
        <div id="child1"></div>
        <div id="child2"></div>
        <div id="child3"></div>
    </div>
</div>
</body>
<style type="text/css">
    * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    #grandparent { 
        width: 800px;
        height: 800px;
        background-color: black;
        border: 1px solid transparent; /*这个属性是设置边框的，但是边框的宽度是0px*/
    }
    #parent1 {
        background-color: red;
        margin-top: 100px;
        margin-left: 100px;
        width: 500px;
        height: 500px;
        
        /* display: grid;
        grid-template-columns: repeat(2, 200px);
        grid-template-rows: repeat(6, 200px); */
        /* flex-direction: column; */
        /* position: relative; */
    }
    #child1 {
        background-color: blue;
        width: 200px;
        height: 200px;
        /* display: inline-block; */
        position:relative;
        /* z-index: 0; */
        left: 50px;
        top: 50px;
        /* position: absolute; */
        /* top: 50px;
        left: 50px; */
    }
    #child2 {
        /* position: relative;
        z-index: 1; */
        background-color: yellow;
        width: 200px;
        height: 200px;
    }
    #child3 {
        /* position: relative;
        z-index: 1; */
        background-color: green;
        width: 200px;
        height: 200px;
    }
</style>
</html>